<? $page_title='采购明细汇总' ?>
<?include "FASHION/page_header.phtml"?>
<div id="printArea">
<table class="ptop" border="0" cellpadding="4" cellspacing="0" width="100%">
         <thead>
            <tr class="nobg">
                <th colspan="4"><h2><?$print_com_name?></h2></th>
            </tr>
            <tr class="nobg">
                <th colspan="4"><h1><?$page_title?></h1></th>
            </tr>
        </thead>        
    </table>
<table border=0 class="list pcontent" width="100%">
    <thead>
	<tr class="nobg">
		<th rowspan="2">编号</th>
		<th rowspan="2">材料名称</th>
		<th rowspan="2">品牌</th>
		<th rowspan="2">规格</th>
		<th rowspan="2">单位</th>
		<th colspan="3">补库采购</th>
		<th colspan="3">专项采购</th>
		<th colspan="3">紧急采购</th>
		<th colspan="3">小计</th>
		<th rowspan="2">部门</th>
		<th rowspan="2">供应商</th>
		<th rowspan="2">备注</th>
	</tr>
	<tr class="nobg">
		<th>数量</th>
		<th>单价</th>
		<th>金额</th>
		<th>数量</th>
		<th>单价</th>
		<th>金额</th>
		<th>数量</th>
		<th>单价</th>
		<th>金额</th>
		<th>数量</th>
		<th>单价</th>
		<th>金额</th>
	</tr>
    </thead>
        <tbody>
<{if $summary.items}>
<{foreach item=ware from=$summary.items}>
	<{foreach item=dept from=$ware.list}>
	<tr>
		<td style="word-break:break-all;"><{$ware.sno}></td>
		<td style="word-break:break-all;"><{$ware.name}></td>
		<td style="word-break:break-all;"><{$ware.brand}></td>
		<td style="word-break:break-all;width:60px"><{$ware.specific}></td>
		<td><{$ware.unit}></td>

		<td><div class="decimal"><{$dept.0.amount}></div></td>
<{if $dept.0.amount && floatval($ware.price) }>
		<td><div class="decimal fnum"><{$ware.price}></div></td>
		<td><div class="decimal fnum"><{= $ware.price*$dept.0.amount}></div></td>
<{else}>
                <td>&nbsp;</td>
		<td>&nbsp;</td>
<{/if}>
		<td><div class="decimal"><{$dept.1.amount}></div></td>
<{if $dept.1.amount && floatval($ware.price) }>
		<td><div class="decimal fnum"><{$ware.price}></div></td>
		<td><div class="decimal fnum"><{= $ware.price*$dept.1.amount}></div></td>
<{else}>
		<td>&nbsp;</td>
		<td>&nbsp;</td>
<{/if}>
		<td><div class="decimal"><{$dept.2.amount}></div></td>
<{if $dept.2.amount && floatval($ware.price) }>
		<td><div class="decimal fnum"><{$ware.price}></div></td>
		<td><div class="decimal fnum"><{= $ware.price*$dept.2.amount}></div></td>
<{else}>
		<td>&nbsp;</td>
		<td>&nbsp;</td>
<{/if}>
		<td><div class="decimal"><{$ware.amount}></div></td>
		<td><div class="decimal fnum"><{$ware.price}></div></td>
		<td><div class="decimal fnum"><{$ware.total}></div></td>

		<td style="word-break:break-all;"><{$dept.name}></td>
		<td style="word-break:break-all;"><{$dept.supplier_name}></td>
		<td style="word-break:break-all;"><{$dept.remark}></td>
	</tr>
	<{/foreach}>
<{/foreach}>
<{/if}>
</tbody>
</table>
</div>

<?include "FASHION/page_footer.phtml"?>
